{extend name="list/list"}

{block name="header"}
    <a href="" class="iconfont fl">&#xe63f;</a>
    <div class="title">注册</div>
    <a href="#" class="iconfont fr">&#xe6a0;</a>
<div class="content">
    <div class="register-box">
        <form action="{:url('mobile/Registe/register')}" method="post" >

            <div class="form-box">
                <div class="row row-input clearfix">
                    <div class="row-l fl"><i class="iconfont">&#xe608;</i></div>
                    <div class="row-r">
                        <input id="Nick" type="text" name="name" class="input_box" autocomplete="off" placeholder="输入昵称">
                    </div>
                </div>

                <div class="row row-input clearfix">
                    <div class="row-l fl"><i class="iconfont">&#xe64f;</i></div>
                    <div class="row-r" id="email">
                        <input id = "yx" type="email"  name="email" class="input_box" autocomplete="off" placeholder="输入邮箱">
                    </div>
                </div>
                <div class="row row-input clearfix">
                    <div class="row-l fl"><i class="iconfont">&#xe692;</i></div>
                    <div class="row-r">
                        <input id="Pwd" type="password" maxlength="18" name="pwd" class="input_box" autocomplete="off" placeholder="输入密码">
                    </div>
                </div>

                <div class="row clearfix">
                    <div class="row-l fl" style="width: 150px">
                        <div class="row row-btn" style="width: 150px">
                            <a id="huoqubtn" class="green-btn huoqubtn" style="width: 150px" name="emailyzm">获取邮箱验证码</a>
                        </div>
                    </div>
                    <div class="row-r" style="margin-left: 150px">
                        <input id="InputCode" name="yzm" maxlength="6" type="text" autocomplete="off" placeholder="验证码" class="input_box">
                    </div>
                </div>


                <div class="row row-btn">
                    <button type="submit" class="btn btn-default col-md-offset-4">注册</button>

                </div>
            </div>

        </form>
    </div>
</div>
<script>
    $(function () {
        // 触发发送邮箱
        var  btn = document.getElementById('huoqubtn');
        $('.huoqubtn').click(function () {
            var  yx = document.getElementById('yx').value;
            var info = $('#email input').serialize();
            // console.log(yx);
            // console.log(info);

                $.ajax({

                    type: 'get',
                    url: "{:url('index/Login/email')}",
                    data:info,
                    success: function (data) {
                        if(data == 'cc'){alert('请输入邮箱')}
                    },
            error: function () {
                btn.innerHTML = '已发送';
                    }
                });

        })

    });
</script>

{/block}
